palette.htmlHTMLudog3ºπùΔ§πùΔ§ÅÅ  Monkeybread Realbasic plugin - Documentation - Palette

MBS Plugin Documentation

This is the documentation for the Realbasic Plugins from Monkeybreadsoftware.de. You find these plugins and the newest version of this document at http://www.monkeybreadsoftware.de/realbasic inside the plugins section.

This help was last updated on Freitag, 6. September 2002 and covers 2136 items: 126 classes, 2 controls and 583 global functions.

The list of the themes Global methods by category Global methods by name The list of the classes The list of the controls

class Palette

class, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: A color palette.

count as integer

property, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: How many colors are inside this palette.
Notes:
This property should be 2, 4, 16 or 256.
Default is 256.

CountColors as integer

method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Counts how many different colors are in the palette.

Mem as memoryblock

method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns a memoryblock to the binary data of this palette.
Notes:
The block is 1024 bytes big and contains 256 32bit values like 00RRGGBB.
The memoryblock is only valid as long as the palette object is living.

NewPicture(width as integer,height as integer) as picture

method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Creates a new picture using this palette.
Notes: On Windows, RB can only work with 32bit picture so this function will return a 32bit picture for you.

Palette as Palette

property, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: -> nil.
Function: Set or get the palette of this picture.
Notes:
On Windows, allways nil.
May return nil if no palette is used for that picture.

NewBluePalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns a 256 color palette with blue shades.

NewGrayPalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns a 256 color palette with grays.

NewGreenPalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns a 256 color palette with green shades.

NewPalette(count as integer) as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Makes a new palette with the given number of colors.
Notes:
Same as:
p=new palette
p.count=count
return p

NewPalmPalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns the Palm system color palette.
Notes: If you want to make 256 color pictures for use on a Palm, you may need that on a Mac.

NewRedPalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns a 256 color palette with red shades.

NewSystemPalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns the system color palette.
Notes: On Windows it's a hard coded palette as you can only read the current palette when the user uses 8bit video.

NewWebPalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns a 256 color palette with the 216 websave colors.
Notes: The palette has 256 colors, but only 216 are used.

NewWindowsPalette as palette

global method, Graphics & Pictures Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Returns the Windows system color palette.
Notes: If you want to make 256 color pictures for use on Windows, you may need that on a Mac.

Contact

Written 2002 by Christian Schmitz. Feel free to ask or report mistakes to realbasic@macsw.de.
Thanks.

This resource fork intentionally left blank ˇˇ